﻿@using WeChatCmsCommon.Unit
@{
    Layout = null;
}

<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>用户登录</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="qinbocai@sina.cn" name="author" />
    <link href="@Url.StaticFile("/assets/css/bootstrap.min.css")" rel="stylesheet" />
    <link href="@Url.StaticFile("/assets/css/font-awesome.min.css")" rel="stylesheet" />
    <link href="@Url.StaticFile("/assets/css/style.css")" rel="stylesheet" />
    <link href="@Url.StaticFile("/assets/css/style_responsive.css")" rel="stylesheet" />
    <link href="@Url.StaticFile("/assets/css/typicons.min.css")" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="@Url.StaticFile("/content/styles/Home/admin.main.css")" />
    <link href="@Url.StaticFile("/Content/Styles/Home/supersized.css")" rel="stylesheet" />
    <style>
        .form-control-no-width {
            height: 34px;
            padding: 6px 12px;
            font-size: 14px;
            line-height: 1.42857143;
            color: #555;
            background-color: #fff;
            background-image: none;
            border: 1px solid #ccc;
            border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
            -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
        }
    </style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="login" onkeydown="keyLogin();">
    <!-- BEGIN LOGO -->
    <div class="logo">
        <img src="@Url.StaticFile("/content/images/logo.png")" alt="" />
    </div>
    <!-- END LOGO -->
    <!-- BEGIN LOGIN -->
    <div class="content">
        <!-- BEGIN LOGIN FORM -->
        @using (Html.BeginForm())
        {
            <h3 class="form-title text-center f-20">请画押验明正身</h3>
            <div class="alert alert-error hide">
                <button class="close" data-dismiss="alert"></button>
                <span>Enter any username and passowrd.</span>
            </div>
            <div class="control-group">
                <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                <label class="control-label visible-ie8 visible-ie9">Username</label>
                <div class="controls">
                    <div class="input-icon left">
                        <i class="fa fa-user"></i>
                        @Html.TextBox("username", string.Empty, new { @class = "form-control", placeholder = "用户名", data_val_required = "用户名不能为空", data_val = "true" })
                    </div>
                    <span class="help-block">@Html.ValidationMessage("username")</span>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label visible-ie8 visible-ie9">Password</label>
                <div class="controls">
                    <div class="input-icon left">
                        <i class="fa fa-key"></i>
                        @Html.Password("password", string.Empty, new { @class = "form-control", placeholder = "密码", data_val_required = "密码不能为空", data_val = "true" })
                    </div>
                    <span class="help-block">@Html.ValidationMessage("password")</span>
                </div>
            </div>


            <div class="control-group">
                <label class="control-label visible-ie8 visible-ie9">CheckCode</label>
                <div class="controls">
                    <div class="input-icon left input-group-xs">
                        <i class="fa fa-check"></i>
                        @Html.TextBox("checkcode", string.Empty, new { @class = "form-control-no-width", placeholder = "验证码", data_val_required = "验证码不能为空", data_val = "true", style = "width:120px;vertical-align:middle" } )
                        <img id="valiCode" style="cursor: pointer; vertical-align: middle; height: 33px; width: 107px;" src="@Url.Action("CheckCode","Auth")" alt="验证码" />
                    </div>
                    <span class="help-block">@Html.ValidationMessage("checkcode")</span>
                </div>
            </div>

            <div class="form-actions-submit">
                <button type="submit" id="submitButton" class="btn pull-right btnsubmitlogin">
                    登 录 <i class="m-icon-swapright m-icon-white"></i>
                </button>
                <span>@Html.ValidationMessage("error") </span>
            </div>
            <div class="create-account dn">
                <p>
                    Don't have an account yet ?&nbsp;
                    <a href="javascript:;" id="register-btn" class="">Create an account</a>
                </p>
            </div>
        }
        <!-- END LOGIN FORM -->
    </div>
    <!-- END LOGIN -->
    <!-- BEGIN COPYRIGHT -->
    <div class="copyright">
        2015 &copy; GMS by qxb09889@ly.com
    </div>
    <!-- END COPYRIGHT -->
    <!-- BEGIN JAVASCRIPTS -->
    <script src="@Url.StaticFile("/assets/js/jquery-2.0.3.min.js")"></script>
    <script src="@Url.StaticFile("/assets/js/bootstrap.min.js")"></script>
    <script src="@Url.StaticFile("/assets/js/jquery.blockui.js")"></script>
    <script src="@Url.StaticFile("/assets/js/app.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("/assets/js/jquery.validate.min.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("/assets/js/jquery.validate.unobtrusive.min.js")"></script>
    <script src="@Url.StaticFile("/assets/js/supersized.3.2.7.min.js")"></script>
    <script>
        jQuery(document).ready(function() {
            App.initLogin();
            $.supersized({

                // Functionality
                slide_interval: 4000, // Length between transitions
                transition:
                    1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
                transition_speed: 1000, // Speed of transition
                performance:
                    1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)

                // Size & Position
                min_width: 0, // Min width allowed (in pixels)
                min_height: 0, // Min height allowed (in pixels)
                vertical_center: 1, // Vertically center background
                horizontal_center: 1, // Horizontally center background
                fit_always: 0, // Image will never exceed browser width or height (Ignores min. dimensions)
                fit_portrait: 1, // Portrait images will not exceed browser height
                fit_landscape: 0, // Landscape images will not exceed browser width

                // Components
                slide_links: 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
                slides: [// Slideshow Images
                    { image: '@Url.StaticFile("/Content/Images/1.jpg")' },
                    { image: '@Url.StaticFile("/Content/Images/2.jpg")' },
                    { image: '@Url.StaticFile("/Content/Images/3.jpg")' }
                ]

            });
        });
    function keyLogin() {
        if (event.keyCode == 13)  //回车键的键值为13
            document.getElementById("submitButton").click(); //调用登录按钮的登录事件
    }

        $(function() {
            $("#valiCode").bind("click",
                function() {
                    this.src = "@Url.Action("CheckCode", "Auth")" +"?time=" + (new Date()).getTime();
                });
        });
    </script>
    <!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
